package top.itaso.app.room.entity;

import androidx.room.ColumnInfo;
import androidx.room.Embedded;
import androidx.room.Entity;
import androidx.room.Index;
import androidx.room.PrimaryKey;

import org.jetbrains.annotations.NotNull;

/**
 * @Description: 扫描到的 Wifi 热点入库信息表
 * @Author itsdf07
 * @E-Mail 923255742@qq.com
 * @Gitee https://gitee.com/itsdf07
 * @Date 2022/1/10
 */
@Entity(tableName = "wifis", indices = {@Index(value = {"_bssid"}, unique = true)})
//复合主键：@Entity(primaryKeys = {"uid", "displayName"})
public class WifiScanResultEntity {

    @PrimaryKey
    @ColumnInfo(name = "_bssid")
    @NotNull
    private String bssid;

    @ColumnInfo(name = "_ssid")
    private String ssid;

    @ColumnInfo(name = "_capabilities")
    private String capabilities;

    @ColumnInfo(name = "venue_name")
    private String venueName;

    @ColumnInfo(name = "_operator_friendly_name")
    private String operatorFriendlyName;

    @ColumnInfo(name = "_center_freq0")
    private int centerFreq0;

    @ColumnInfo(name = "_center_freq1")
    private int centerFreq1;

    @ColumnInfo(name = "_channel_width")
    private int channelWidth;

    @ColumnInfo(name = "_frequency")
    private int frequency;

    @ColumnInfo(name = "_level")
    private int level;

    @ColumnInfo(name = "_wifi_timestamp")
    private long timestamp;

    @ColumnInfo(name = "_describe_contents")
    private int describeContents;

    @ColumnInfo(name = "_is80211_mc_responder")
    private boolean is80211mcResponder;

    @ColumnInfo(name = "_isPasspoint_network")
    private boolean isPasspointNetwork;

    @Embedded(prefix = "_wifi_ssid")
    private WifiSsid wifiSsid;

//    @Ignore
//    private String avatar;


    @NotNull
    public String getBssid() {
        return bssid;
    }

    public void setBssid(@NotNull String bssid) {
        this.bssid = bssid;
    }

    public String getSsid() {
        return ssid;
    }

    public void setSsid(String ssid) {
        this.ssid = ssid;
    }

    public String getCapabilities() {
        return capabilities;
    }

    public void setCapabilities(String capabilities) {
        this.capabilities = capabilities;
    }

    public String getVenueName() {
        return venueName;
    }

    public void setVenueName(String venueName) {
        this.venueName = venueName;
    }

    public String getOperatorFriendlyName() {
        return operatorFriendlyName;
    }

    public void setOperatorFriendlyName(String operatorFriendlyName) {
        this.operatorFriendlyName = operatorFriendlyName;
    }

    public int getCenterFreq0() {
        return centerFreq0;
    }

    public void setCenterFreq0(int centerFreq0) {
        this.centerFreq0 = centerFreq0;
    }

    public int getCenterFreq1() {
        return centerFreq1;
    }

    public void setCenterFreq1(int centerFreq1) {
        this.centerFreq1 = centerFreq1;
    }

    public int getChannelWidth() {
        return channelWidth;
    }

    public void setChannelWidth(int channelWidth) {
        this.channelWidth = channelWidth;
    }

    public int getFrequency() {
        return frequency;
    }

    public void setFrequency(int frequency) {
        this.frequency = frequency;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    public int getDescribeContents() {
        return describeContents;
    }

    public void setDescribeContents(int describeContents) {
        this.describeContents = describeContents;
    }

    public boolean isIs80211mcResponder() {
        return is80211mcResponder;
    }

    public void setIs80211mcResponder(boolean is80211mcResponder) {
        this.is80211mcResponder = is80211mcResponder;
    }

    public boolean isPasspointNetwork() {
        return isPasspointNetwork;
    }

    public void setPasspointNetwork(boolean passpointNetwork) {
        isPasspointNetwork = passpointNetwork;
    }

    public WifiSsid getWifiSsid() {
        return wifiSsid;
    }

    public void setWifiSsid(WifiSsid wifiSsid) {
        this.wifiSsid = wifiSsid;
    }

    public static class WifiSsid {
        @ColumnInfo(name = "_octets")
        private int octets;
        @ColumnInfo(name = "_ori_ssid")
        private String oriSsid;

        public int getOctets() {
            return octets;
        }

        public void setOctets(int octets) {
            this.octets = octets;
        }

        public String getOriSsid() {
            return oriSsid;
        }

        public void setOriSsid(String oriSsid) {
            this.oriSsid = oriSsid;
        }
    }

    public void cloneFromScanResult() {

    }
}
